XN.Main.init("<!--{echo $apikey}-->","/xd_receiver.html"<!--{if !$discuz_uid&&$connectstatus&&!$logout}-->, {"ifUserConnected":"index.php"}<!--{/if}--><!--{if ($_DCOOKIE['isRenRenLogin']||$_COOKIE['isRenRenLogin'])&&$connectstatus&&!$logout}-->, {"ifUserNotConnected":"index.php"}<!--{/if}-->);

        function renren_logout()
           {
               <!--{if ($_DCOOKIE['isRenRenLogin']||$_COOKIE['isRenRenLogin'])&&$connectstatus}-->
                XN.Connect.logout(function() {
                                                //window.location ='logging.php?action=logout&formhash={FORMHASH}';
                                                document.formx1.action='logging.php?action=logout&formhash={FORMHASH}';
                                                document.formx1.submit.click();
                });
                            <!--{else}-->
                                                document.formx1.action='logging.php?action=logout&formhash={FORMHASH}';
                                                document.formx1.submit.click();
                                <!--{/if}-->
           }